package com.accenture.struts2.action;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import org.apache.struts2.ServletActionContext;

public class BasicAction3 {

	public InputStream pdfstream;
	
	public String execute(){
		
		try {
			
			pdfstream = new FileInputStream(ServletActionContext.getServletContext().getRealPath("WEB-INF//classes//stream.pdf"));
		}
		catch(FileNotFoundException e){
			e.printStackTrace();
		}
		return "success";
	}

	public InputStream getPdfStream() {
		return pdfstream;
	}

	public void setPdfStream(InputStream pdfstream) {
		this.pdfstream = pdfstream;
	}

}
